import request from '@/utils/request-enca'
export function getPostList(params) {  
    return request({
        url: '/admin',
        method: 'GET',
        params,
    })
}

export function getPostDetail(id) {
    return request({
        url: 'system/post/' + id,
        method: 'GET'
    })
}



export function updatePost(data) {
    return request({
        url: '/system/post',
        method: 'PUT',
        data
    })
}


export function addPost(data) {
    return request({
        url: '/system/post',
        method: 'POST',
        data
    })
}

export function delPost(id) {
    return request({
        url: '/system/post/' + id,
        method: 'DELETE'
    })
}